\(\int \frac {1+x}{2 x+x^2} \, dx\) [219]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 12 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {1}{2} \log \left (2 x+x^2\right ) \]

[Out]

1/2*ln(x^2+2*x)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {642} \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {1}{2} \log \left (x^2+2 x\right ) \]

[In]

Int[(1 + x)/(2*x + x^2),x]

[Out]

Log[2*x + x^2]/2

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \log \left (2 x+x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.25 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {\log (x)}{2}+\frac {1}{2} \log (2+x) \]

[In]

Integrate[(1 + x)/(2*x + x^2),x]

[Out]

Log[x]/2 + Log[2 + x]/2

Maple [A] (verified)

Time = 1.98 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.75

method result size
default \(\frac {\ln \left (x \left (2+x \right )\right )}{2}\) \(9\)
risch \(\frac {\ln \left (x^{2}+2 x \right )}{2}\) \(11\)
norman \(\frac {\ln \left (x \right )}{2}+\frac {\ln \left (2+x \right )}{2}\) \(12\)
parallelrisch \(\frac {\ln \left (x \right )}{2}+\frac {\ln \left (2+x \right )}{2}\) \(12\)
meijerg \(\frac {\ln \left (x \right )}{2}-\frac {\ln \left (2\right )}{2}+\frac {\ln \left (\frac {x}{2}+1\right )}{2}\) \(18\)

[In]

int((1+x)/(x^2+2*x),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(x*(2+x))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {1}{2} \, \log \left (x^{2} + 2 \, x\right ) \]

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="fricas")

[Out]

1/2*log(x^2 + 2*x)

Sympy [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {\log {\left (x^{2} + 2 x \right )}}{2} \]

[In]

integrate((1+x)/(x**2+2*x),x)

[Out]

log(x**2 + 2*x)/2

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.83 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {1}{2} \, \log \left (x^{2} + 2 \, x\right ) \]

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="maxima")

[Out]

1/2*log(x^2 + 2*x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.08 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {1}{2} \, \log \left (2 \, {\left | \frac {1}{2} \, x^{2} + x \right |}\right ) \]

[In]

integrate((1+x)/(x^2+2*x),x, algorithm="giac")

[Out]

1/2*log(2*abs(1/2*x^2 + x))

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.67 \[ \int \frac {1+x}{2 x+x^2} \, dx=\frac {\ln \left (x\,\left (x+2\right )\right )}{2} \]

[In]

int((x + 1)/(2*x + x^2),x)

[Out]

log(x*(x + 2))/2